package momo.app.multicast;

import momo.app.comms.CommsManager;
import momo.app.config.AppConfig;
import momo.app.structure.Message;

public class SendTask implements Runnable
{
	private String contents;
	private boolean synchronizedRequired = false;
	public SendTask(String contents, boolean synchronizedRequired)
	{
		this.contents = contents;
		this.synchronizedRequired = synchronizedRequired;
	}
	
	public void run()
	{
		Message msg = new Message(Message.NO_FORWARD, AppConfig.getInstance().getId(), Message.USER_DATA, contents);
		CommsManager.getInstance().sourceForward(msg, synchronizedRequired);
	}
}
